Skip to content

Conversation

@jonathanyeong
Copy link
Contributor

This replaces the tab list so it's extra clear to the user what package manager they've selected. It also lets use use it in the connector modal to be explicit on the package manager choice.

The dropdown is inspired by Stripe's dev docs

Testing

desktop-view-with-keyboard-nav.mp4
mobile-view.mp4

@vercel
Copy link

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Jan 30, 2026 1:05pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Jan 30, 2026 1:05pm
npmx-lunaria Ignored Ignored Jan 30, 2026 1:05pm

Request Review


<template>
<div class="relative">
<button
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chose to build a custom dropdown because I think icons don't show up well in native select. Someone please correct me if I'm wrong!

@jonathanyeong
Copy link
Contributor Author

Not quite ready for review there's a bug when the install container is short

install container is short and cuts off the package manager list

aria-hidden="true"
/>
</button>
<div class="ml-auto flex items-center gap-2">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use ms-auto instead ml-auto (RTL support): check the contributing guide: https://github.com/npmx-dev/npmx.dev/blob/main/CONTRIBUTING.md#rtl-support

</template>
</ClientOnly>
<span
class="i-carbon-chevron-down w-3 h-3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use : to split collection and icon (small perf at UnoCSS)

@danielroe
Copy link
Collaborator

much nicer 👌

: undefined
"
:aria-label="$t('settings.package_manager')"
class="absolute right-0 top-full mt-1 min-w-28 bg-bg-elevated border border-border rounded-lg shadow-lg z-50 overflow-hidden py-1"
Copy link
Contributor

@userquin userquin Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use left/right use inset-is and inset-ie respectivelly (when using absolute psotioning)

<span>{{ pm.label }}</span>
<span
v-if="selectedPM === pm.id"
class="i-carbon-checkmark w-3 h-3 text-accent ml-auto shrink-0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace ml-auto with ms-auto

@danielroe
Copy link
Collaborator

FYI: #393 might mean this needs to have conflicts resolved.

we wouldn't render the tabs any more of course, but we'd keep the same approach for rendered install commands

This replaces the tab list so it's extra clear to the user what
package manager they've selected. It also lets use use it in the
connector modal to be explicit on the package manager choice.
Comment on lines 848 to +849
<PackageManagerTabs />
<PackageManagerSelect />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Remove PackageManagerTabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants